<?php

namespace Modules\Admin\Database\Seeders;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use Modules\Admin\Entities\Admin;

class AdminDatabaseSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Model::unguard();
        Admin::query()->firstOrCreate(
            [
                'username' => 'admin',
            ],
            [
                'name' => '超级管理员',
                'super_admin' => 1,
                'mobile' => '13888888888',
                'password' => Hash::make('kczx@Xunlu2021'),
            ]
        );
    }
}
